const s = new Set();
s.add(1).add(2).add(3).add(1);

console.log('s', s);

s.forEach(i => console.log('forEach',i));

for (let i of s) {
    console.log('for of', i);
}

console.log('size', s.size);

console.log('has 1', s.has(1));

console.log('delete 1', s.delete(1));

console.log('s', s);


s.clear();
console.log('clear', s);


const arr = [1,2,2,3,4,5,6,6,7,8,8,8,];
const newArr = Array.from(new Set(arr));
console.log(' arr', arr)
console.log(' 去重 newArr', newArr)

